home *** CD-ROM | disk | FTP | other *** search
/ Isometric Game Programming with DirectX 7.0 / Isometric Game Programming.iso / source / chapter25 / isohex25_1 / d3dfuncs.h < prev    next >
C/C++ Source or Header  |  2000-11-27  |  2KB  |  54 lines

  1. /*****************************************************************************
  2. D3DFuncs.h
  3. Ernest S. Pazera
  4. 17NOV2000
  5. Requires the use of d3d8.lib, ddraw.lib and dxguid.lib
  6. Also requires GDICanvas.h/cpp and DDFuncs.h/cpp
  7. *****************************************************************************/
  8. //include guard
  9. #ifndef D3DFUNCS_H
  10. #define D3DFUNCS_H
  11.  
  12. #include "DDFuncs.h"
  13. #include "d3d.h"
  14.  
  15. //create the IDirect3D7 interface
  16. LPDIRECT3D7 LPD3D_Create(LPDIRECTDRAW7 lpdd);
  17.  
  18. //clean up an IDirect3D7
  19. void LPD3D_Release(LPDIRECT3D7* lpd3d);
  20.  
  21. //create the Device
  22. LPDIRECT3DDEVICE7 LPD3DDEV_Create(LPDIRECT3D7 lpd3d,LPDIRECTDRAWSURFACE7 lpdds);
  23.  
  24. //set up the viewport
  25. void LPD3DDEV_SetViewport(LPDIRECT3DDEVICE7 lpd3ddev,DWORD x,DWORD y,DWORD width,DWORD height);
  26.  
  27. //clear out the viewport
  28. void LPD3DDEV_Clear(LPDIRECT3DDEVICE7 lpd3ddev,D3DCOLOR color);
  29.  
  30. //draw triangle list
  31. void LPD3DDEV_DrawTriangleList(LPDIRECT3DDEVICE7 lpd3ddev,D3DTLVERTEX* pvertices,DWORD dwvertexcount);
  32.  
  33. //draw triangle strip
  34. void LPD3DDEV_DrawTriangleStrip(LPDIRECT3DDEVICE7 lpd3ddev,D3DTLVERTEX* pvertices,DWORD dwvertexcount);
  35.  
  36. //clean up a device
  37. void LPD3DDEV_Release(LPDIRECT3DDEVICE7* lpd3ddev);
  38.  
  39. //primary surface as a 3d rendering target
  40. LPDIRECTDRAWSURFACE7 LPDDS_CreatePrimary3D(LPDIRECTDRAW7 lpdd,DWORD dwBackBufferCount);
  41.  
  42. //back buffer as a 3d rendering target
  43. LPDIRECTDRAWSURFACE7 LPDDS_GetSecondary3D(LPDIRECTDRAWSURFACE7 lpdds);
  44.  
  45. //create a texture
  46. LPDIRECTDRAWSURFACE7 LPDDS_CreateTexture(LPDIRECTDRAW7 lpdd,DWORD dwWidth,DWORD dwHeight);
  47.  
  48. //create a texture with a particular pixel format
  49. LPDIRECTDRAWSURFACE7 LPDDS_CreateTexturePixelFormat(LPDIRECTDRAW7 lpdd,DWORD dwWidth,DWORD dwHeight,LPDDPIXELFORMAT lpddpf);
  50.  
  51. //set vertex data
  52. void VERTEX_Set(D3DTLVERTEX* pVert,D3DVALUE x,D3DVALUE y, D3DCOLOR color, D3DVALUE tu, D3DVALUE tv);
  53.  
  54. #endif